<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改</title>
</head>
<body>
<form th:action="@{updateBook}" method="post">
    <div align="center">
        <h4>新增图书信息</h4>
        <table>
            <tr>
                <td colspan="2"><input type="hidden" name="id" th:value="${bookstore.getId()}"></td>
            </tr>
            <tr>
                <td>书名：</td>
                <td><input type="text" name="name" th:value="${bookstore.getName()}"></td>
            </tr>
            <tr>
                <td>价格：</td>
                <td><input type="text" name="price" th:value="${bookstore.getPrice()}"></td>
            </tr>
            <tr>
                <td>类目：</td>
                <td>
                    <input type="radio" name="category" value="计算机"
                           th:value="${bookstore.getCategory().equals('计算机')}">计算机
                    <input type="radio" name="category" value="文学"
                           th:value="${bookstore.getCategory().equals('文学')}">文学
                    <input type="radio" name="category" value="其他"
                           th:value="${bookstore.getCategory().equals('其他')}">其他
                </td>
            </tr>
            <tr>
                <td>库存：</td>
                <td><input type="text" name="pnum" th:value="${bookstore.getPnum()}"></td>
            </tr>
            <tr>
                <td>图片：</td>
                <td><input type="file" name="imgurl" th:value="${bookstore.getImgurl()}"></td>
            </tr>
            <tr>
                <td>说明：</td>
                <td><input type="text" name="description" th:value="${bookstore.getDescription()}"></td>
            </tr>
            <tr>
                <td>作者：</td>
                <td><input type="text" name="author" th:value="${bookstore.getAuthor()}"></td>
            </tr>
            <tr>
                <td>已售：</td>
                <td><input type="text" name="sales" th:value="${bookstore.getSales()}"></td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="submit" value="提交">
                    <input type="reset" value="重置">
                    <a th:href="@{/bookPage}"></a><input type="button" value="返回">
                </td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>